package main;

import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.NumberFormat;
import java.util.Locale;
import java.util.Timer;
import java.util.TimerTask;

import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.SpringLayout;
import javax.swing.UIManager;
import javax.swing.border.EtchedBorder;
import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.table.DefaultTableModel;
import java.awt.BorderLayout;
import javax.swing.JComboBox;
import javax.swing.SwingConstants;
import java.awt.event.ActionListener;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JMenuItem;


public class main_window {

	private JFrame frmWineGameWine;
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					main_window window = new main_window();
					window.frmWineGameWine.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public main_window() {
	
	
		try {
			  UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
			} catch(Exception e) {
			  System.out.println("Error setting native LAF: " + e);
			}
		values.setIDGame(0);
		values.setNGame("Join a game");
		values.setWeek(0);
		initialize();

		timer = new Timer();
	    timer.scheduleAtFixedRate(new RemindTask(), 0, //initial delay
		        15 * 1000); //subsequent rate
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		ImageIcon img = null;
		try {
			img = new ImageIcon(new URL(connect.Dev_URL() + "icon.png"));
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		frmWineGameWine = new JFrame();
		frmWineGameWine.setIconImage(img.getImage());
		frmWineGameWine.setTitle("Wine Game Wine Supply Chain Council");
		frmWineGameWine.setBounds(100, 100, 842, 707);
		frmWineGameWine.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		SpringLayout springLayout = new SpringLayout();
		frmWineGameWine.getContentPane().setLayout(springLayout);
		SplashScreen nn;
		try {
			nn = new SplashScreen(new URL(connect.Dev_URL() + "splash2.png"), frmWineGameWine, 2000);
			nn.setVisible(true);
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}	
		try {
			wait = new ImageIcon(new URL(connect.Dev_URL() + "att.gif"));
			go = new ImageIcon(new URL(connect.Dev_URL() + "ok.gif"));
		} catch (MalformedURLException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		JMenuBar menuBar = new JMenuBar();
		springLayout.putConstraint(SpringLayout.NORTH, menuBar, 0, SpringLayout.NORTH, frmWineGameWine.getContentPane());
		springLayout.putConstraint(SpringLayout.WEST, menuBar, 0, SpringLayout.WEST, frmWineGameWine.getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, menuBar, 21, SpringLayout.NORTH, frmWineGameWine.getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, menuBar, 0, SpringLayout.EAST, frmWineGameWine.getContentPane());
		frmWineGameWine.getContentPane().add(menuBar);
		
		JMenu mnFile = new JMenu("File");
		menuBar.add(mnFile);
		
		tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		springLayout.putConstraint(SpringLayout.WEST, tabbedPane, 0, SpringLayout.WEST, frmWineGameWine.getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, tabbedPane, 0, SpringLayout.EAST, menuBar);
		frmWineGameWine.getContentPane().add(tabbedPane);
		
		JPanel panel_ini = new JPanel();
		tabbedPane.addTab("Start", null, panel_ini, null);
		panel_ini.setLayout(null);
		
		JLabel lblNewLabel_7 = new JLabel("Welcome to The Wine Game");
		lblNewLabel_7.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblNewLabel_7.setBounds(10, 11, 715, 43);
		panel_ini.add(lblNewLabel_7);
		
		JLabel lblNewLabel_8 = new JLabel("Please join a game to start.");
		lblNewLabel_8.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblNewLabel_8.setBounds(43, 68, 173, 23);
		panel_ini.add(lblNewLabel_8);
		
		button_4 = new JButton("Finish Planning Week");
		button_4.setBounds(226, 70, 81, 23);
		panel_ini.add(button_4);
		springLayout.putConstraint(SpringLayout.SOUTH, button_4, -6, SpringLayout.NORTH, tabbedPane);
		button_4.setAction(action);
		
		JPanel panel = new JPanel();
		tabbedPane.addTab("Order Management", null, panel, null);
		SpringLayout sl_panel = new SpringLayout();
		panel.setLayout(sl_panel);
		
		JLabel lblOrderManagement = new JLabel("Order Management");
		lblOrderManagement.setFont(new Font("Tahoma", Font.PLAIN, 14));
		sl_panel.putConstraint(SpringLayout.NORTH, lblOrderManagement, 10, SpringLayout.NORTH, panel);
		sl_panel.putConstraint(SpringLayout.WEST, lblOrderManagement, 26, SpringLayout.WEST, panel);
		panel.add(lblOrderManagement);
		
		JPanel panel_6 = new JPanel();
		sl_panel.putConstraint(SpringLayout.NORTH, panel_6, 6, SpringLayout.SOUTH, lblOrderManagement);
		sl_panel.putConstraint(SpringLayout.WEST, panel_6, 10, SpringLayout.WEST, panel);
		sl_panel.putConstraint(SpringLayout.SOUTH, panel_6, 181, SpringLayout.SOUTH, lblOrderManagement);
		sl_panel.putConstraint(SpringLayout.EAST, panel_6, -10, SpringLayout.EAST, panel);
		panel_6.setBorder(new TitledBorder(null, "Customer Order Information", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel.add(panel_6);
		panel_6.setLayout(null);
		
		textField = new JTextField();
		textField.setEditable(false);
		textField.setBounds(134, 82, 62, 20);
		panel_6.add(textField);
		textField.setColumns(10);
		
		JLabel lblCurrentImporterOrder = new JLabel("Retailer Order White");
		lblCurrentImporterOrder.setLabelFor(textField);
		lblCurrentImporterOrder.setBounds(10, 85, 121, 14);
		panel_6.add(lblCurrentImporterOrder);
		
		JLabel lblContainers = new JLabel("Pallets");
		lblContainers.setBounds(206, 85, 81, 14);
		panel_6.add(lblContainers);
		
		JLabel lblCurrentImporterBacklog = new JLabel("Retailer Backlog White");
		lblCurrentImporterBacklog.setBounds(10, 110, 132, 14);
		panel_6.add(lblCurrentImporterBacklog);
		
		textField_1 = new JTextField();
		textField_1.setEditable(false);
		textField_1.setBounds(134, 107, 62, 20);
		panel_6.add(textField_1);
		textField_1.setColumns(10);
		
		JLabel lblContainers_1 = new JLabel("Pallets");
		lblContainers_1.setBounds(206, 110, 92, 14);
		panel_6.add(lblContainers_1);
		
		JPanel panel_7 = new JPanel();
		panel_7.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Demand History", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_7.setBounds(266, 13, 525, 145);
		panel_6.add(panel_7);
		panel_7.setLayout(null);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(6, 16, 509, 122);
		panel_7.add(scrollPane);
		
		table = new JTable();
		scrollPane.setViewportView(table);
		table.setSurrendersFocusOnKeystroke(true);
		table.setBackground(new Color(255, 255, 255));
		table.setRowSelectionAllowed(false);
		table.setToolTipText("");
		table.setBorder(null);
		table.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"Week", "D. Red", "Back. Red", "Ship Red", "D. White", "Back. White", "Ship White"
			}
		));
		
		JButton btnMakeShipment = new JButton("Make Shipment");
		btnMakeShipment.setAction(action_1);
		btnMakeShipment.setBounds(105, 135, 105, 23);
		panel_6.add(btnMakeShipment);
		
		JPanel panel_8 = new JPanel();
		sl_panel.putConstraint(SpringLayout.NORTH, panel_8, 6, SpringLayout.SOUTH, panel_6);
		sl_panel.putConstraint(SpringLayout.WEST, panel_8, 0, SpringLayout.WEST, panel_6);
		sl_panel.putConstraint(SpringLayout.SOUTH, panel_8, 181, SpringLayout.SOUTH, panel_6);
		sl_panel.putConstraint(SpringLayout.EAST, panel_8, 0, SpringLayout.EAST, panel_6);
		panel_8.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Order to Importer Management", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel.add(panel_8);
		panel_8.setLayout(null);
		
		JPanel panel_9 = new JPanel();
		panel_9.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Order History", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_9.setBounds(271, 14, 520, 150);
		panel_8.add(panel_9);
		panel_9.setLayout(null);
		
		JScrollPane scrollPane_1 = new JScrollPane();
		scrollPane_1.setBounds(10, 21, 500, 118);
		panel_9.add(scrollPane_1);
		
		table_1 = new JTable();
		scrollPane_1.setViewportView(table_1);
		table_1.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
			    "Week Ord.", "Week Avail.", "Or. White", "Arr. White", "Or. Red", "Arr. Red"
			}
		));
		
		JLabel lblCurrentWeekProduction = new JLabel("White Wine Arrival");
		lblCurrentWeekProduction.setBounds(10, 31, 100, 14);
		panel_8.add(lblCurrentWeekProduction);
		
		JLabel lblCurrentWeekProduction_1 = new JLabel("Red Wine Arrival");
		lblCurrentWeekProduction_1.setBounds(10, 60, 100, 14);
		panel_8.add(lblCurrentWeekProduction_1);
		
		textField_2 = new JTextField();
		textField_2.setEditable(false);
		textField_2.setBounds(120, 28, 62, 20);
		panel_8.add(textField_2);
		textField_2.setColumns(10);
		
		textField_3 = new JTextField();
		textField_3.setEditable(false);
		textField_3.setBounds(120, 57, 62, 20);
		panel_8.add(textField_3);
		textField_3.setColumns(10);
		
		JLabel lblPallets = new JLabel("Pallets");
		lblPallets.setBounds(192, 31, 92, 14);
		panel_8.add(lblPallets);
		
		JLabel lblPallets_1 = new JLabel("Pallets");
		lblPallets_1.setBounds(192, 60, 92, 14);
		panel_8.add(lblPallets_1);
		
		JButton btnMakeProductionOrder = new JButton("Make Import Order");
		btnMakeProductionOrder.setAction(action_2);
		btnMakeProductionOrder.setBounds(103, 112, 145, 23);
		panel_8.add(btnMakeProductionOrder);
		
		JPanel panel_10 = new JPanel();
		sl_panel.putConstraint(SpringLayout.NORTH, panel_10, 6, SpringLayout.SOUTH, panel_8);
		sl_panel.putConstraint(SpringLayout.SOUTH, panel_10, 0, SpringLayout.SOUTH, panel);
		panel_10.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Demand / Inventory Information", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		sl_panel.putConstraint(SpringLayout.WEST, panel_10, 10, SpringLayout.WEST, panel);
		sl_panel.putConstraint(SpringLayout.EAST, panel_10, 0, SpringLayout.EAST, panel_6);
		
		JLabel lblImporterBacklogRed = new JLabel("Retailer Backlog Red");
		lblImporterBacklogRed.setBounds(10, 57, 121, 14);
		panel_6.add(lblImporterBacklogRed);
		
		JLabel lblNewJgoodiesLabel = new JLabel("Retailer Order Red");
		lblNewJgoodiesLabel.setBounds(10, 32, 121, 14);
		panel_6.add(lblNewJgoodiesLabel);
		
		textField_5 = new JTextField();
		textField_5.setEditable(false);
		textField_5.setBounds(134, 54, 62, 20);
		panel_6.add(textField_5);
		textField_5.setColumns(10);
		
		textField_6 = new JTextField();
		textField_6.setEditable(false);
		textField_6.setBounds(134, 29, 62, 20);
		panel_6.add(textField_6);
		textField_6.setColumns(10);
		
		JLabel lblPallets_2 = new JLabel("Pallets");
		lblPallets_2.setBounds(206, 32, 92, 14);
		panel_6.add(lblPallets_2);
		
		JLabel lblPallets_3 = new JLabel("Pallets");
		lblPallets_3.setBounds(206, 57, 92, 14);
		panel_6.add(lblPallets_3);
		panel.add(panel_10);
		panel_10.setLayout(null);
		
		JPanel panel_11 = new JPanel();
		panel_11.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Inventory/Backlog History", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_11.setBounds(365, 21, 426, 134);
		panel_10.add(panel_11);
		panel_11.setLayout(null);
		
		JScrollPane scrollPane_2 = new JScrollPane();
		scrollPane_2.setBounds(6, 16, 414, 107);
		panel_11.add(scrollPane_2);
		
		table_2 = new JTable();
		scrollPane_2.setViewportView(table_2);
		table_2.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
					"Week", "Red Inv.", "Red Backlog", "White Inv.", "White Backlog"
			}
		));
		
		JPanel panel_24 = new JPanel();
		panel_24.setBorder(new TitledBorder(null, "Demand", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_24.setBounds(103, 21, 171, 134);
		panel_10.add(panel_24);
		panel_24.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane_7 = new JScrollPane();
		panel_24.add(scrollPane_7, BorderLayout.CENTER);
		
		table_7 = new JTable();
		table_7.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"Week", "D. White", "D. Red"
			}
		));
		scrollPane_7.setViewportView(table_7);
		
		JPanel panel_o = new JPanel();
		tabbedPane.addTab("Make Order", wait, panel_o, null);
		panel_o.setLayout(null);
		
		JPanel panel_20 = new JPanel();
		panel_20.setBorder(new TitledBorder(null, "Make Order", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_20.setBounds(10, 10, 801, 174);
		panel_o.add(panel_20);
		panel_20.setLayout(null);
		
		JLabel lblRetailerOrderRed = new JLabel("Retailer Order Red");
		lblRetailerOrderRed.setBounds(10, 32, 121, 14);
		panel_20.add(lblRetailerOrderRed);
		
		textField_11 = new JTextField();
		textField_11.setHorizontalAlignment(SwingConstants.CENTER);
		textField_11.setEditable(false);
		textField_11.setColumns(10);
		textField_11.setBounds(134, 29, 62, 20);
		panel_20.add(textField_11);
		
		JLabel lblRetailerBacklogRed = new JLabel("Retailer Backlog Red");
		lblRetailerBacklogRed.setBounds(10, 57, 121, 14);
		panel_20.add(lblRetailerBacklogRed);
		
		textField_12 = new JTextField();
		textField_12.setHorizontalAlignment(SwingConstants.CENTER);
		textField_12.setEditable(false);
		textField_12.setColumns(10);
		textField_12.setBounds(134, 54, 62, 20);
		panel_20.add(textField_12);
		
		JLabel lblRetailerOrderWhite = new JLabel("Retailer Order White");
		lblRetailerOrderWhite.setBounds(10, 85, 121, 14);
		panel_20.add(lblRetailerOrderWhite);
		
		textField_13 = new JTextField();
		textField_13.setHorizontalAlignment(SwingConstants.CENTER);
		textField_13.setEditable(false);
		textField_13.setColumns(10);
		textField_13.setBounds(134, 82, 62, 20);
		panel_20.add(textField_13);
		
		JLabel lblRetailerBacklogWhite = new JLabel("Retailer Backlog White");
		lblRetailerBacklogWhite.setBounds(10, 110, 132, 14);
		panel_20.add(lblRetailerBacklogWhite);
		
		textField_14 = new JTextField();
		textField_14.setHorizontalAlignment(SwingConstants.CENTER);
		textField_14.setEditable(false);
		textField_14.setColumns(10);
		textField_14.setBounds(134, 107, 62, 20);
		panel_20.add(textField_14);
		
		JLabel lblAvailableWhiteWine = new JLabel("Available White Wine");
		lblAvailableWhiteWine.setBounds(206, 32, 121, 14);
		panel_20.add(lblAvailableWhiteWine);
		
		JLabel lblAvailableRedWine = new JLabel("Available Red Wine");
		lblAvailableRedWine.setBounds(206, 57, 121, 14);
		panel_20.add(lblAvailableRedWine);
		
		textField_15 = new JTextField();
		textField_15.setHorizontalAlignment(SwingConstants.CENTER);
		textField_15.setEditable(false);
		textField_15.setColumns(10);
		textField_15.setBounds(330, 54, 62, 20);
		panel_20.add(textField_15);
		
		textField_16 = new JTextField();
		textField_16.setHorizontalAlignment(SwingConstants.CENTER);
		textField_16.setEditable(false);
		textField_16.setColumns(10);
		textField_16.setBounds(330, 29, 62, 20);
		panel_20.add(textField_16);
		
		textField_17 = new JTextField();
		textField_17.setHorizontalAlignment(SwingConstants.CENTER);
		textField_17.setEditable(false);
		textField_17.setColumns(10);
		textField_17.setBounds(402, 29, 62, 20);
		panel_20.add(textField_17);
		
		textField_18 = new JTextField();
		textField_18.setHorizontalAlignment(SwingConstants.CENTER);
		textField_18.setEditable(false);
		textField_18.setColumns(10);
		textField_18.setBounds(402, 54, 62, 20);
		panel_20.add(textField_18);
		
		textField_19 = new JTextField();
		textField_19.setHorizontalAlignment(SwingConstants.CENTER);
		textField_19.setEditable(false);
		textField_19.setColumns(10);
		textField_19.setBounds(474, 29, 62, 20);
		panel_20.add(textField_19);
		
		textField_20 = new JTextField();
		textField_20.setHorizontalAlignment(SwingConstants.CENTER);
		textField_20.setEditable(false);
		textField_20.setColumns(10);
		textField_20.setBounds(474, 54, 62, 20);
		panel_20.add(textField_20);
		
		JLabel lblInv = new JLabel("Inv.");
		lblInv.setBounds(343, 11, 46, 14);
		panel_20.add(lblInv);
		
		JLabel lblArrived = new JLabel("Arrived");
		lblArrived.setBounds(415, 11, 46, 14);
		panel_20.add(lblArrived);
		
		JLabel lblNewLabel = new JLabel("Total");
		lblNewLabel.setBounds(490, 11, 46, 14);
		panel_20.add(lblNewLabel);
		
		JLabel lblNewLabel_1 = new JLabel("Order White");
		lblNewLabel_1.setBounds(246, 85, 81, 14);
		panel_20.add(lblNewLabel_1);
		
		JLabel lblOrderRed = new JLabel("Order Red");
		lblOrderRed.setBounds(246, 110, 81, 14);
		panel_20.add(lblOrderRed);
		
		textField_21 = new JTextField();
		textField_21.setBounds(330, 82, 62, 20);
		panel_20.add(textField_21);
		textField_21.setColumns(10);
		
		textField_22 = new JTextField();
		textField_22.setColumns(10);
		textField_22.setBounds(330, 107, 62, 20);
		panel_20.add(textField_22);
		
		 btnNewButton = new JButton("Place Order");
		btnNewButton.setAction(action_3);
		btnNewButton.setBounds(319, 135, 89, 23);
		panel_20.add(btnNewButton);
		
		JPanel panel_21 = new JPanel();
		panel_21.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Order History", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_21.setBounds(10, 195, 801, 250);
		panel_o.add(panel_21);
		panel_21.setLayout(null);
		
		JPanel panel_22 = new JPanel();
		panel_22.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Importer Order History", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_22.setBounds(366, 24, 425, 204);
		panel_21.add(panel_22);
		panel_22.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane_5 = new JScrollPane();
		panel_22.add(scrollPane_5, BorderLayout.CENTER);
		
		table_5 = new JTable();
		table_5.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"Week Ord.", "Week Avail.", "Or. White", "Arr. White", "Or. Red", "Arr. Red"
			}
		));
		scrollPane_5.setViewportView(table_5);
		
		JPanel panel_23 = new JPanel();
		panel_23.setBorder(new TitledBorder(null, "Demand History", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_23.setBounds(10, 24, 356, 204);
		panel_21.add(panel_23);
		panel_23.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane_6 = new JScrollPane();
		panel_23.add(scrollPane_6, BorderLayout.CENTER);
		
		table_6 = new JTable();
		table_6.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"Week", "D. White", "Bac. White", "D. Red", "Bac. Red"
			}
		));
		scrollPane_6.setViewportView(table_6);
		
		JPanel panel_3 = new JPanel();
		tabbedPane.addTab("Make Shipping", wait, panel_3, null);
		panel_3.setLayout(null);
		
		JPanel panel_1 = new JPanel();
		panel_1.setLayout(null);
		panel_1.setBounds(0, 0, 821, 550);
		panel_3.add(panel_1);
		
		JPanel panel_12 = new JPanel();
		panel_12.setLayout(null);
		panel_12.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Truck Building", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_12.setBounds(10, 52, 801, 211);
		panel_1.add(panel_12);
		
		JLabel label = new JLabel(" White Wine Available");
		label.setBounds(216, 19, 110, 14);
		panel_12.add(label);
		
		JLabel label_1 = new JLabel(" Red Wine Available");
		label_1.setBounds(216, 44, 110, 14);
		panel_12.add(label_1);
		
		JLabel lblTruckMaxCapacity = new JLabel("Truck Max Capacity");
		lblTruckMaxCapacity.setBounds(216, 69, 129, 14);
		panel_12.add(lblTruckMaxCapacity);
		
		JLabel label_3 = new JLabel("Qty White Wine Ship.");
		label_3.setBounds(216, 94, 129, 14);
		panel_12.add(label_3);
		
		JLabel label_4 = new JLabel("Qty Red Wine Ship.");
		label_4.setBounds(216, 119, 129, 14);
		panel_12.add(label_4);
		
		JLabel label_7 = new JLabel("2");
		label_7.setBounds(349, 69, 46, 14);
		panel_12.add(label_7);
		
		JButton btnBuildTruck = new JButton("Build Truck");
		btnBuildTruck.setAction(action_4);
		btnBuildTruck.setBounds(305, 177, 116, 23);
		panel_12.add(btnBuildTruck);
		
		JPanel panel_13 = new JPanel();
		panel_13.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Trucks", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_13.setBounds(517, 11, 274, 161);
		panel_12.add(panel_13);
		panel_13.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane_4 = new JScrollPane();
		panel_13.add(scrollPane_4, BorderLayout.CENTER);
		
		table_3 = new JTable();
		table_3.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"Truck ID", "# Trucks", "Qty. White", "Qty. Red"
			}
		));
		scrollPane_4.setViewportView(table_3);
		
		 button_1 = new JButton("Ship");
		button_1.setAction(action_6);
		button_1.setBounds(627, 177, 89, 23);
		panel_12.add(button_1);
		
		JButton btnTruckContainer = new JButton("Delete Truck");
		btnTruckContainer.setAction(action_5);
		btnTruckContainer.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		btnTruckContainer.setBounds(431, 177, 129, 23);
		panel_12.add(btnTruckContainer);
		
		JLabel lblCostPerTruck = new JLabel("Cost per Truck : $ 15");
		lblCostPerTruck.setBounds(406, 19, 128, 14);
		panel_12.add(lblCostPerTruck);
		
		comboBox = new JComboBox();
		comboBox.setModel(new DefaultComboBoxModel(new String[] {"Sel. Qty.", "0", "1", "2"}));
		comboBox.setBounds(349, 91, 72, 20);
		panel_12.add(comboBox);
		
		comboBox_1 = new JComboBox();
		comboBox_1.setModel(new DefaultComboBoxModel(new String[] {"Sel. Qty.", "0", "1", "2"}));
		comboBox_1.setBounds(349, 116, 72, 20);
		panel_12.add(comboBox_1);
		
		JLabel lblDistributorOrderRed = new JLabel("Retailer Order Red");
		lblDistributorOrderRed.setBounds(10, 26, 121, 14);
		panel_12.add(lblDistributorOrderRed);
		
		textField_7 = new JTextField();
		textField_7.setHorizontalAlignment(SwingConstants.CENTER);
		textField_7.setEditable(false);
		textField_7.setColumns(10);
		textField_7.setBounds(134, 23, 62, 20);
		panel_12.add(textField_7);
		
		JLabel lblDistributorBacklogRed = new JLabel("Retailer Backlog Red");
		lblDistributorBacklogRed.setBounds(10, 51, 121, 14);
		panel_12.add(lblDistributorBacklogRed);
		
		textField_8 = new JTextField();
		textField_8.setHorizontalAlignment(SwingConstants.CENTER);
		textField_8.setEditable(false);
		textField_8.setColumns(10);
		textField_8.setBounds(134, 48, 62, 20);
		panel_12.add(textField_8);
		
		JLabel lblDistributorOrderWhite = new JLabel("Retailer Order White");
		lblDistributorOrderWhite.setBounds(10, 79, 121, 14);
		panel_12.add(lblDistributorOrderWhite);
		
		textField_9 = new JTextField();
		textField_9.setHorizontalAlignment(SwingConstants.CENTER);
		textField_9.setEditable(false);
		textField_9.setColumns(10);
		textField_9.setBounds(134, 76, 62, 20);
		panel_12.add(textField_9);
		
		JLabel lblDistributorBacklogWhite = new JLabel("Retailer Backlog White");
		lblDistributorBacklogWhite.setBounds(10, 104, 132, 14);
		panel_12.add(lblDistributorBacklogWhite);
		
		textField_10 = new JTextField();
		textField_10.setHorizontalAlignment(SwingConstants.CENTER);
		textField_10.setEditable(false);
		textField_10.setColumns(10);
		textField_10.setBounds(134, 101, 62, 20);
		panel_12.add(textField_10);
		
		textField_23 = new JTextField();
		textField_23.setHorizontalAlignment(SwingConstants.CENTER);
		textField_23.setEditable(false);
		textField_23.setColumns(10);
		textField_23.setBounds(333, 16, 62, 20);
		panel_12.add(textField_23);
		
		textField_24 = new JTextField();
		textField_24.setHorizontalAlignment(SwingConstants.CENTER);
		textField_24.setEditable(false);
		textField_24.setColumns(10);
		textField_24.setBounds(333, 41, 62, 20);
		panel_12.add(textField_24);
		
		JLabel lblOfTrucks = new JLabel("# of Trucks to build");
		lblOfTrucks.setBounds(216, 144, 129, 14);
		panel_12.add(lblOfTrucks);
		
		 comboBox_2 = new JComboBox();
		comboBox_2.setModel(new DefaultComboBoxModel(new String[] {"Qty.", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}));
		comboBox_2.setBounds(349, 144, 72, 20);
		panel_12.add(comboBox_2);
		
		JLabel label_13 = new JLabel("Shipping Management Panel");
		label_13.setFont(new Font("Tahoma", Font.PLAIN, 16));
		label_13.setBounds(10, 11, 268, 20);
		panel_1.add(label_13);
		
		JPanel panel_14 = new JPanel();
		panel_14.setBorder(new TitledBorder(null, "Shipping History", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_14.setBounds(10, 273, 801, 229);
		panel_1.add(panel_14);
		panel_14.setLayout(null);
		
		JScrollPane scrollPane_3 = new JScrollPane();
		scrollPane_3.setBounds(10, 30, 400, 188);
		panel_14.add(scrollPane_3);
		
		table_4 = new JTable();
		table_4.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
			     "Week Shipped", "Units", "Qty. White", "Qty. Red", "Week Arrival"
			}
		));
		scrollPane_3.setViewportView(table_4);
		
		JPanel panel_2 = new JPanel();
		tabbedPane.addTab("Inventory / Backlog", null, panel_2, null);
		panel_2.setLayout(null);
		
		JPanel panel_15 = new JPanel();
		panel_15.setLayout(null);
		panel_15.setBounds(0, 0, 821, 550);
		panel_2.add(panel_15);
		
		JLabel label_2 = new JLabel("Inventory Management Panel");
		label_2.setFont(new Font("Tahoma", Font.PLAIN, 16));
		label_2.setBounds(10, 11, 284, 30);
		panel_15.add(label_2);
		
		JPanel panel_16 = new JPanel();
		panel_16.setLayout(null);
		panel_16.setBorder(new TitledBorder(null, "Inventory Information", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_16.setBounds(10, 52, 801, 206);
		panel_15.add(panel_16);
		
		JLabel label_8 = new JLabel("White Wine Inventory");
		label_8.setBounds(21, 26, 125, 14);
		panel_16.add(label_8);
		
		JLabel label_14 = new JLabel("Red Wine Inventory");
		label_14.setBounds(21, 51, 125, 14);
		panel_16.add(label_14);
		
		JLabel label_15 = new JLabel("Inventory Cost per Week");
		label_15.setBounds(21, 76, 125, 14);
		panel_16.add(label_15);
		
		JLabel label_16 = new JLabel("Current Week Inv Costs");
		label_16.setBounds(21, 101, 125, 14);
		panel_16.add(label_16);
		
		JLabel label_17 = new JLabel("Cumulative Inventory Costs");
		label_17.setBounds(21, 126, 134, 14);
		panel_16.add(label_17);
		
		JPanel panel_17 = new JPanel();
		panel_17.setBorder(new TitledBorder(null, "Historical Inv. Data", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_17.setBounds(295, 26, 457, 166);
		panel_16.add(panel_17);
		panel_17.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane_9 = new JScrollPane();
		panel_17.add(scrollPane_9, BorderLayout.CENTER);
		
		table_10 = new JTable();
		table_10.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
					"Week", "Red Inventory", "White Inventory"
			}
		));
		scrollPane_9.setViewportView(table_10);
		
		textField_44 = new JTextField();
		textField_44.setColumns(10);
		textField_44.setBounds(165, 20, 86, 20);
		panel_16.add(textField_44);
		
		textField_45 = new JTextField();
		textField_45.setColumns(10);
		textField_45.setBounds(165, 45, 86, 20);
		panel_16.add(textField_45);
		
		textField_46 = new JTextField();
		textField_46.setText("$ 4");
		textField_46.setColumns(10);
		textField_46.setBounds(165, 70, 86, 20);
		panel_16.add(textField_46);
		
		textField_47 = new JTextField();
		textField_47.setColumns(10);
		textField_47.setBounds(165, 95, 86, 20);
		panel_16.add(textField_47);
		
		textField_48 = new JTextField();
		textField_48.setColumns(10);
		textField_48.setBounds(165, 120, 86, 20);
		panel_16.add(textField_48);
		
		JPanel panel_18 = new JPanel();
		panel_18.setLayout(null);
		panel_18.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Backlog Information", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_18.setBounds(10, 299, 801, 206);
		panel_15.add(panel_18);
		
		JLabel label_18 = new JLabel("White Wine Backlog");
		label_18.setBounds(21, 26, 125, 14);
		panel_18.add(label_18);
		
		JLabel label_19 = new JLabel("Red Wine Backlog");
		label_19.setBounds(21, 51, 125, 14);
		panel_18.add(label_19);
		
		JLabel label_20 = new JLabel("Backlog Cost per Week");
		label_20.setBounds(21, 76, 125, 14);
		panel_18.add(label_20);
		
		JLabel label_21 = new JLabel("Current Backlog Inv Costs");
		label_21.setBounds(21, 101, 125, 14);
		panel_18.add(label_21);
		
		JLabel label_22 = new JLabel("Cumulative Backlog Costs");
		label_22.setBounds(21, 126, 134, 14);
		panel_18.add(label_22);
		
		JPanel panel_19 = new JPanel();
		panel_19.setBorder(new TitledBorder(null, "Historical Inv. Data", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_19.setBounds(295, 26, 457, 166);
		panel_18.add(panel_19);
		panel_19.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane_10 = new JScrollPane();
		panel_19.add(scrollPane_10, BorderLayout.CENTER);
		
		table_9 = new JTable();
		table_9.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
					"Week", "Red Backlog", "White Backlog"
			}
		));
		scrollPane_10.setViewportView(table_9);
		
		textField_49 = new JTextField();
		textField_49.setColumns(10);
		textField_49.setBounds(165, 120, 86, 20);
		panel_18.add(textField_49);
		
		textField_50 = new JTextField();
		textField_50.setColumns(10);
		textField_50.setBounds(165, 95, 86, 20);
		panel_18.add(textField_50);
		
		textField_51 = new JTextField();
		textField_51.setText("$ 6");
		textField_51.setColumns(10);
		textField_51.setBounds(165, 70, 86, 20);
		panel_18.add(textField_51);
		
		textField_52 = new JTextField();
		textField_52.setColumns(10);
		textField_52.setBounds(165, 45, 86, 20);
		panel_18.add(textField_52);
		
		textField_53 = new JTextField();
		textField_53.setColumns(10);
		textField_53.setBounds(165, 20, 86, 20);
		panel_18.add(textField_53);
		
		JPanel panel_4 = new JPanel();
		tabbedPane.addTab("Summary Satistics", null, panel_4, null);
		panel_4.setLayout(null);
		
		JPanel panel_25 = new JPanel();
		panel_25.setLayout(null);
		panel_25.setBorder(new TitledBorder(null, "Financial Statistics", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_25.setBounds(10, 11, 801, 528);
		panel_4.add(panel_25);
		
		JLabel label_5 = new JLabel("Inventory Cost per Week");
		label_5.setBounds(10, 98, 125, 14);
		panel_25.add(label_5);
		
		textField_25 = new JTextField();
		textField_25.setText("$ 4");
		textField_25.setColumns(10);
		textField_25.setBounds(154, 92, 86, 20);
		panel_25.add(textField_25);
		
		JLabel label_6 = new JLabel("Current Week Inv Costs");
		label_6.setBounds(10, 123, 125, 14);
		panel_25.add(label_6);
		
		textField_26 = new JTextField();
		textField_26.setColumns(10);
		textField_26.setBounds(154, 117, 86, 20);
		panel_25.add(textField_26);
		
		JLabel label_9 = new JLabel("Cumulative Inventory Costs");
		label_9.setBounds(10, 148, 134, 14);
		panel_25.add(label_9);
		
		textField_27 = new JTextField();
		textField_27.setColumns(10);
		textField_27.setBounds(154, 142, 86, 20);
		panel_25.add(textField_27);
		
		JLabel label_10 = new JLabel("Backlog Cost per Week");
		label_10.setBounds(10, 179, 125, 14);
		panel_25.add(label_10);
		
		textField_28 = new JTextField();
		textField_28.setText("$ 6");
		textField_28.setColumns(10);
		textField_28.setBounds(154, 173, 86, 20);
		panel_25.add(textField_28);
		
		JLabel label_11 = new JLabel("Current Backlog Inv Costs");
		label_11.setBounds(10, 204, 125, 14);
		panel_25.add(label_11);
		
		textField_29 = new JTextField();
		textField_29.setColumns(10);
		textField_29.setBounds(154, 198, 86, 20);
		panel_25.add(textField_29);
		
		JLabel label_12 = new JLabel("Cumulative Backlog Costs");
		label_12.setBounds(10, 229, 134, 14);
		panel_25.add(label_12);
		
		textField_30 = new JTextField();
		textField_30.setColumns(10);
		textField_30.setBounds(154, 223, 86, 20);
		panel_25.add(textField_30);
		
		JLabel label_23 = new JLabel("Shipping Cost per Unit");
		label_23.setBounds(10, 260, 125, 14);
		panel_25.add(label_23);
		
		textField_31 = new JTextField();
		textField_31.setText("$ 10");
		textField_31.setColumns(10);
		textField_31.setBounds(154, 254, 86, 20);
		panel_25.add(textField_31);
		
		JLabel label_24 = new JLabel("Current Shpping Costs");
		label_24.setBounds(10, 285, 125, 14);
		panel_25.add(label_24);
		
		textField_32 = new JTextField();
		textField_32.setColumns(10);
		textField_32.setBounds(154, 279, 86, 20);
		panel_25.add(textField_32);
		
		JLabel label_25 = new JLabel("Cumulative Shipping Costs");
		label_25.setBounds(10, 310, 134, 14);
		panel_25.add(label_25);
		
		textField_33 = new JTextField();
		textField_33.setColumns(10);
		textField_33.setBounds(154, 304, 86, 20);
		panel_25.add(textField_33);
		
		JPanel panel_26 = new JPanel();
		panel_26.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Historical Financial Data", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_26.setBounds(265, 11, 526, 506);
		panel_25.add(panel_26);
		panel_26.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane_8 = new JScrollPane();
		panel_26.add(scrollPane_8, BorderLayout.CENTER);
		
		table_8 = new JTable();
		table_8.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
					"Week", "Wine Cost", "Inv. Cost", "Backlog Cost", "Ship. Costs", "Total Costs", "Total Sale", "Profit", "C. Profit/Loss"
			}
		));
		scrollPane_8.setViewportView(table_8);
		
		JLabel label_26 = new JLabel("Total Costs");
		label_26.setBounds(10, 341, 125, 14);
		panel_25.add(label_26);
		
		textField_34 = new JTextField();
		textField_34.setColumns(10);
		textField_34.setBounds(154, 335, 86, 20);
		panel_25.add(textField_34);
		
		JLabel label_27 = new JLabel("Cumulative Total Costs");
		label_27.setBounds(10, 366, 134, 14);
		panel_25.add(label_27);
		
		textField_35 = new JTextField();
		textField_35.setColumns(10);
		textField_35.setBounds(154, 360, 86, 20);
		panel_25.add(textField_35);
		
		JLabel label_28 = new JLabel("Sale price per Unit");
		label_28.setBounds(10, 397, 125, 14);
		panel_25.add(label_28);
		
		textField_36 = new JTextField();
		textField_36.setText("$ 110");
		textField_36.setColumns(10);
		textField_36.setBounds(154, 391, 86, 20);
		panel_25.add(textField_36);
		
		JLabel label_29 = new JLabel("Current Total Sales");
		label_29.setBounds(10, 422, 125, 14);
		panel_25.add(label_29);
		
		textField_37 = new JTextField();
		textField_37.setColumns(10);
		textField_37.setBounds(154, 416, 86, 20);
		panel_25.add(textField_37);
		
		JLabel label_30 = new JLabel("Cumulative Sales");
		label_30.setBounds(10, 447, 134, 14);
		panel_25.add(label_30);
		
		textField_38 = new JTextField();
		textField_38.setColumns(10);
		textField_38.setBounds(154, 441, 86, 20);
		panel_25.add(textField_38);
		
		JLabel label_31 = new JLabel("Total Profit (Loss)");
		label_31.setBounds(10, 478, 125, 14);
		panel_25.add(label_31);
		
		textField_39 = new JTextField();
		textField_39.setColumns(10);
		textField_39.setBounds(154, 472, 86, 20);
		panel_25.add(textField_39);
		
		JLabel label_32 = new JLabel("Cumulative Profit (Loss)");
		label_32.setBounds(10, 503, 134, 14);
		panel_25.add(label_32);
		
		textField_40 = new JTextField();
		textField_40.setColumns(10);
		textField_40.setBounds(154, 497, 86, 20);
		panel_25.add(textField_40);
		
		JLabel label_33 = new JLabel("Wine Cost per Pallet");
		label_33.setBounds(10, 23, 125, 14);
		panel_25.add(label_33);
		
		textField_41 = new JTextField();
		textField_41.setText("$ 80");
		textField_41.setColumns(10);
		textField_41.setBounds(154, 17, 86, 20);
		panel_25.add(textField_41);
		
		JLabel label_34 = new JLabel("Current Week Wine Costs");
		label_34.setBounds(10, 48, 125, 14);
		panel_25.add(label_34);
		
		textField_42 = new JTextField();
		textField_42.setColumns(10);
		textField_42.setBounds(154, 42, 86, 20);
		panel_25.add(textField_42);
		
		JLabel label_35 = new JLabel("Cumulative Wine Costs");
		label_35.setBounds(10, 73, 134, 14);
		panel_25.add(label_35);
		
		textField_43 = new JTextField();
		textField_43.setColumns(10);
		textField_43.setBounds(154, 67, 86, 20);
		panel_25.add(textField_43);
		
		JPanel panel_5 = new JPanel();
		springLayout.putConstraint(SpringLayout.NORTH, panel_5, 637, SpringLayout.NORTH, frmWineGameWine.getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, tabbedPane, -6, SpringLayout.NORTH, panel_5);
		springLayout.putConstraint(SpringLayout.WEST, panel_5, 0, SpringLayout.WEST, menuBar);
		springLayout.putConstraint(SpringLayout.SOUTH, panel_5, 0, SpringLayout.SOUTH, frmWineGameWine.getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, panel_5, 0, SpringLayout.EAST, menuBar);
		
		JMenu mnNewMenu = new JMenu("DB Connection");
		menuBar.add(mnNewMenu);
		panel_5.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
		frmWineGameWine.getContentPane().add(panel_5);
		panel_5.setLayout(null);
		
		
		JLabel lblTheWineGame = new JLabel("The Wine Game - Distributor Module");
		springLayout.putConstraint(SpringLayout.NORTH, tabbedPane, 6, SpringLayout.SOUTH, lblTheWineGame);
		springLayout.putConstraint(SpringLayout.EAST, lblTheWineGame, 295, SpringLayout.WEST, frmWineGameWine.getContentPane());
		springLayout.putConstraint(SpringLayout.NORTH, lblTheWineGame, 6, SpringLayout.SOUTH, menuBar);
		springLayout.putConstraint(SpringLayout.WEST, lblTheWineGame, 10, SpringLayout.WEST, frmWineGameWine.getContentPane());
		lblTheWineGame.setFont(new Font("Tahoma", Font.PLAIN, 16));
		frmWineGameWine.getContentPane().add(lblTheWineGame);
		
		JLabel lblNewJgoodiesTitle = new JLabel("Week");
		springLayout.putConstraint(SpringLayout.NORTH, lblNewJgoodiesTitle, 6, SpringLayout.SOUTH, menuBar);
		lblNewJgoodiesTitle.setFont(new Font("Tahoma", Font.PLAIN, 16));
		frmWineGameWine.getContentPane().add(lblNewJgoodiesTitle);
		
		textField_4 = new JTextField();
		springLayout.putConstraint(SpringLayout.EAST, lblNewJgoodiesTitle, -8, SpringLayout.WEST, textField_4);
		springLayout.putConstraint(SpringLayout.WEST, textField_4, 737, SpringLayout.WEST, frmWineGameWine.getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, textField_4, -10, SpringLayout.EAST, frmWineGameWine.getContentPane());
		springLayout.putConstraint(SpringLayout.NORTH, textField_4, 6, SpringLayout.SOUTH, menuBar);
		
		JMenu mnAbout = new JMenu("About");
		menuBar.add(mnAbout);
		
		JMenuItem mntmAboutWineGame = new JMenuItem("About Wine Game");
		mntmAboutWineGame.setAction(action_7);
		mnAbout.add(mntmAboutWineGame);
		textField_4.setEditable(false);
		frmWineGameWine.getContentPane().add(textField_4);
		textField_4.setColumns(10);
		
		lblStatus = new JLabel("Game: " + values.getNGame());
		lblStatus.setBounds(8, 8, 150, 14);
		panel_5.add(lblStatus);
		
		JLabel lblStatus0 = new JLabel("Status: ");
		lblStatus0.setBounds(160, 8, 50, 14);
		panel_5.add(lblStatus0);
		
		lblStatus2 = new JLabel();
		lblStatus2.setBounds(200, 8,200, 14);
		panel_5.add(lblStatus2);
		
		JLabel lblStatus1 = new JLabel("Winery: ");
		lblStatus1.setBounds(400, 8, 70, 14);
		panel_5.add(lblStatus1);
		
		lblStatus4 = new JLabel("Ordering");
		lblStatus4.setBounds(450, 8,50, 14);
		panel_5.add(lblStatus4);
		
		JLabel lblStatus11 = new JLabel("Importer : ");
		lblStatus11.setBounds(520, 8, 70, 14);
		panel_5.add(lblStatus11);
		
		lblStatus5 = new JLabel("Ordering");
		lblStatus5.setBounds(580, 8,50, 14);
		panel_5.add(lblStatus5);
		
		JLabel lblStatus12 = new JLabel("Retailer: ");
		lblStatus12.setBounds(640, 8, 70, 14);
		panel_5.add(lblStatus12);
		
		lblStatus6 = new JLabel("Ordering");
		lblStatus6.setBounds(685, 8,50, 14);
		panel_5.add(lblStatus6);
		
		tabbedPane.addChangeListener(new ChangeListener() {
		      public void stateChanged(ChangeEvent e) {
		        if (values.getIDGame()==0 && tabbedPane.getSelectedIndex()!=0) {
		        	JOptionPane.showMessageDialog( null,
						       "Please join a game!",
						       "Error", JOptionPane.ERROR_MESSAGE);
		        	tabbedPane.setSelectedIndex(0);
		        } else {
		        	if (tabbedPane.getTabCount()==6 && values.getIDGame()!=0) {
		        		tabbedPane.removeTabAt(0);
		        	}
		        }
		      }
		    });
	}

	//Variables
	
	 private static String fName = "Game.config";
	 private JTextField textField;
	 private JTextField textField_1;
	 private JTable table;
	 private JTable table_1;
	 private JTextField textField_2;
	 private JTextField textField_3;
	 private JTextField textField_4;
	 private JTable table_2;
	 private JTextField textField_5;
	 private JTextField textField_6;
	 private JTabbedPane tabbedPane;
	 private JLabel lblStatus;
	 private JLabel lblStatus2;
	 private JLabel lblStatus4;
	 private JLabel lblStatus5;
	 private JLabel lblStatus6;
	 private JButton button_4;
	 private final Action action = new SwingAction();
	 public Timer timer;
	 private ImageIcon wait;
	 private ImageIcon go;
	 private final Action action_1 = new SwingAction_1();
	 private final Action action_2 = new SwingAction_2();
	 private JTextField textField_7;
	 private JTextField textField_8;
	 private JTextField textField_9;
	 private JTextField textField_10;
	 private JTable table_3;
	 private JTable table_4;
	 private JTextField textField_11;
	 private JTextField textField_12;
	 private JTextField textField_13;
	 private JTextField textField_14;
	 private JTextField textField_15;
	 private JTextField textField_16;
	 private JTextField textField_17;
	 private JTextField textField_18;
	 private JTextField textField_19;
	 private JTextField textField_20;
	 private JTable table_5;
	 private JTextField textField_21;
	 private JTextField textField_22;
	 private JTable table_6;
	 private JTable table_7;
	 private final Action action_3 = new SwingAction_3();
	 private JButton btnNewButton;
	 private JTextField textField_23;
	 private JTextField textField_24;
	 private final Action action_4 = new SwingAction_4();
	 private JComboBox comboBox;
	 private JComboBox comboBox_1;
	 private JComboBox comboBox_2;
	 private final Action action_5 = new SwingAction_5();
	 private final Action action_6 = new SwingAction_6();
	 private JButton button_1;
	 private final Action action_7 = new SwingAction_7();
	 private JTextField textField_25;
	 private JTextField textField_26;
	 private JTextField textField_27;
	 private JTextField textField_28;
	 private JTextField textField_29;
	 private JTextField textField_30;
	 private JTextField textField_31;
	 private JTextField textField_32;
	 private JTextField textField_33;
	 private JTextField textField_34;
	 private JTextField textField_35;
	 private JTextField textField_36;
	 private JTextField textField_37;
	 private JTextField textField_38;
	 private JTextField textField_39;
	 private JTextField textField_40;
	 private JTextField textField_41;
	 private JTextField textField_42;
	 private JTextField textField_43;
	 private JTable table_8;
	 private JTextField textField_44;
	 private JTextField textField_45;
	 private JTextField textField_46;
	 private JTextField textField_47;
	 private JTextField textField_48;
	 private JTextField textField_49;
	 private JTextField textField_50;
	 private JTextField textField_51;
	 private JTextField textField_52;
	 private JTextField textField_53;
	 private JTable table_9;
	 private JTable table_10;
	 
		private void upStart(){
			lblStatus.setForeground(Color.BLUE);
			lblStatus.setText("Playing game: " + values.getNGame());
			int[] stat = new int[5];
	    	stat=connect.getStatus();
	    	if (stat[4]==5) {
				lblStatus2.setForeground(Color.GREEN);
				lblStatus2.setText("Changing week.");
				values.setWeek(0);
			} else {
				lblStatus2.setForeground(Color.red);
				lblStatus2.setText("Waiting for participants.");
			}
	    	int[] ord = new int[4];
	    	int[] prod = new int[2];
	    	double[] fin = new double[12];
	    	double[] ing = new double[2];
			try {
				connect.pop_tablaOrd(table,2);
				connect.pop_tablaOrden(table_1,2);
				connect.pop_tablaOrden(table_5,2);
				connect.pop_tablaInvback(table_2,2);
				connect.pop_tablaDemand(table_7,3);
				connect.pop_tablaOrd2(table_6,2);
				connect.pop_tablaShip(table_4, 2);
				connect.pop_tablaFin(table_8,2);
				connect.pop_tablaInv(table_10,2);
				connect.pop_tablaBack(table_9,2);
				ord=connect.getOrders(3);
				textField_4.setText(""+values.getWeek());
				textField_6.setText(""+ord[0]);
				textField_11.setText(""+ord[0]);
				textField_7.setText(""+ord[0]);
				textField_5.setText(""+ord[1]);
				textField_12.setText(""+ord[1]);
				textField_8.setText(""+ord[1]);
				textField.setText(""+ord[2]);
				textField_13.setText(""+ord[2]);
				textField_9.setText(""+ord[2]);
				textField_1.setText(""+ord[3]);
				textField_14.setText(""+ord[3]);
				textField_10.setText(""+ord[3]);
				int[] avaw = new int[3];
				int[] avar = new int[3];
				avaw = connect.getWineAvailW(1);
				avar = connect.getWineAvailW(2);
				textField_16.setText(""+avaw[0]);
				textField_17.setText(""+avaw[1]);
				textField_19.setText(""+avaw[2]);
				textField_15.setText(""+avar[0]);
				textField_18.setText(""+avar[1]);
				textField_20.setText(""+avar[2]);
				textField_23.setText(""+avaw[2]);
				textField_24.setText(""+avar[2]);
				prod=connect.getProd();
				textField_2.setText(""+prod[0]);
				textField_3.setText(""+prod[1]);
				fin = connect.getFinR(2,values.getWeek());
				ing = connect.getIngR(2, values.getWeek());
				NumberFormat currencyFormatter =  NumberFormat.getCurrencyInstance(Locale.US);	
				textField_42.setText("" + currencyFormatter.format(fin[0]*80));
				textField_43.setText("" + currencyFormatter.format(fin[1]*80));
				textField_26.setText("" + currencyFormatter.format(fin[2]*4));
				textField_27.setText("" + currencyFormatter.format(fin[3]*4));
				textField_29.setText("" + currencyFormatter.format(fin[4]*6));
				textField_30.setText("" + currencyFormatter.format(fin[5]*6));
				textField_32.setText("" + currencyFormatter.format(fin[6]*10));
				textField_33.setText("" + currencyFormatter.format(fin[7]*10));
				textField_34.setText("" + currencyFormatter.format(fin[0]*80 + fin[6]*10+fin[2]*4+fin[4]*6));
				textField_35.setText("" + currencyFormatter.format(fin[1]*80 + fin[7]*10+fin[3]*4+fin[5]*6));
				textField_37.setText("" + currencyFormatter.format(ing[0]*110));
				textField_38.setText("" + currencyFormatter.format(ing[1]*110));
				textField_39.setText("" + currencyFormatter.format(ing[0]*110 - ((fin[0]*80 + fin[6]*10+fin[2]*4+fin[4]*6))));
				textField_40.setText("" + currencyFormatter.format(ing[1]*110-(fin[1]*80 + fin[7]*10+fin[3]*4+fin[5]*6)));
				textField_44.setText(""+fin[8]);
				textField_45.setText(""+fin[9]);
				textField_53.setText(""+fin[10]);
				textField_52.setText(""+fin[11]);
				textField_47.setText("" + currencyFormatter.format(fin[2]*4));
				textField_48.setText("" + currencyFormatter.format(fin[3]*4));
				textField_50.setText("" + currencyFormatter.format(fin[4]*6));
				textField_49.setText("" + currencyFormatter.format(fin[5]*6));
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

		private void reset(){
	  		values.setL1(false);
	  		tabbedPane.setIconAt(1,wait);
	  		btnNewButton.setEnabled(true);
	  		
			button_1.setEnabled(true);
			tabbedPane.setIconAt(2,wait);
			values.setShip(false);
			
			lblStatus.setForeground(Color.BLUE);
			lblStatus.setText("Playing game: " + values.getNGame());
			int[] stat = new int[5];
	    	stat=connect.getStatus();
	    	if (stat[4]==5) {
				lblStatus2.setForeground(Color.GREEN);
				lblStatus2.setText("Changing week.");
				values.setWeek(0);
			} else {
				lblStatus2.setForeground(Color.red);
				lblStatus2.setText("Waiting for participants.");
			}
	    	int[] ord = new int[4];
	    	int[] prod = new int[2];
	    	double[] fin = new double[12];
	    	double[] ing = new double[2];
			try {
				connect.pop_tablaOrd(table,2);
				connect.pop_tablaOrden(table_1,2);
				connect.pop_tablaOrden(table_5,2);
				connect.pop_tablaInvback(table_2,2);
				connect.pop_tablaDemand(table_7,3);
				connect.pop_tablaOrd2(table_6,2);
				connect.pop_tablaShip(table_4, 2);
				connect.pop_tablaFin(table_8,2);
				connect.pop_tablaInv(table_10,2);
				connect.pop_tablaBack(table_9,2);
				ord=connect.getOrders(3);
				textField_4.setText(""+values.getWeek());
				textField_6.setText(""+ord[0]);
				textField_11.setText(""+ord[0]);
				textField_7.setText(""+ord[0]);
				textField_5.setText(""+ord[1]);
				textField_12.setText(""+ord[1]);
				textField_8.setText(""+ord[1]);
				textField.setText(""+ord[2]);
				textField_13.setText(""+ord[2]);
				textField_9.setText(""+ord[2]);
				textField_1.setText(""+ord[3]);
				textField_14.setText(""+ord[3]);
				textField_10.setText(""+ord[3]);
				int[] avaw = new int[3];
				int[] avar = new int[3];
				avaw = connect.getWineAvailW(1);
				avar = connect.getWineAvailW(2);
				textField_16.setText(""+avaw[0]);
				textField_17.setText(""+avaw[1]);
				textField_19.setText(""+avaw[2]);
				textField_15.setText(""+avar[0]);
				textField_18.setText(""+avar[1]);
				textField_20.setText(""+avar[2]);
				textField_23.setText(""+avaw[2]);
				textField_24.setText(""+avar[2]);
				prod=connect.getProd();
				textField_2.setText(""+prod[0]);
				textField_3.setText(""+prod[1]);
				fin = connect.getFinR(2,values.getWeek());
				ing = connect.getIngR(2, values.getWeek());
				NumberFormat currencyFormatter =  NumberFormat.getCurrencyInstance(Locale.US);	
				textField_42.setText("" + currencyFormatter.format(fin[0]*80));
				textField_43.setText("" + currencyFormatter.format(fin[1]*80));
				textField_26.setText("" + currencyFormatter.format(fin[2]*4));
				textField_27.setText("" + currencyFormatter.format(fin[3]*4));
				textField_29.setText("" + currencyFormatter.format(fin[4]*6));
				textField_30.setText("" + currencyFormatter.format(fin[5]*6));
				textField_32.setText("" + currencyFormatter.format(fin[6]*10));
				textField_33.setText("" + currencyFormatter.format(fin[7]*10));
				textField_34.setText("" + currencyFormatter.format(fin[0]*80 + fin[6]*10+fin[2]*4+fin[4]*6));
				textField_35.setText("" + currencyFormatter.format(fin[1]*80 + fin[7]*10+fin[3]*4+fin[5]*6));
				textField_37.setText("" + currencyFormatter.format(ing[0]*110));
				textField_38.setText("" + currencyFormatter.format(ing[1]*110));
				textField_39.setText("" + currencyFormatter.format(ing[0]*110 - ((fin[0]*80 + fin[6]*10+fin[2]*4+fin[4]*6))));
				textField_40.setText("" + currencyFormatter.format(ing[1]*110-(fin[1]*80 + fin[7]*10+fin[3]*4+fin[5]*6)));
				textField_44.setText(""+fin[8]);
				textField_45.setText(""+fin[9]);
				textField_53.setText(""+fin[10]);
				textField_52.setText(""+fin[11]);
				textField_47.setText("" + currencyFormatter.format(fin[2]*4));
				textField_48.setText("" + currencyFormatter.format(fin[3]*4));
				textField_50.setText("" + currencyFormatter.format(fin[4]*6));
				textField_49.setText("" + currencyFormatter.format(fin[5]*6));
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	 class RemindTask extends TimerTask {
		 
		    public void run() {
		    	connect.upStatcon();
		  	//Execute the look in the DB for new data
		    	int[] stat = new int[6];
		    	stat=connect.getStatus();
		    	if (stat[4]==4 || stat[5]!=values.getWeek()) {		    		
		    		if (stat[5]!=values.getWeek()) {
		    			System.out.println("Change " + stat[5]);
		    			lblStatus2.setForeground(Color.GREEN);
			    		lblStatus2.setText("Changing week.");
			    		values.setWeek(stat[5]);
			    		reset();
		    		} else {
		    			System.out.println("Wait ");
		    			lblStatus2.setForeground(Color.BLUE);
			    		lblStatus2.setText("Waiting for change in week.");
		    		}
		    	} else if (values.getIDGame()==0){
		    		lblStatus2.setForeground(Color.red);
		    		lblStatus2.setText("Please join a game.");
		    	} else {	    		
		    		lblStatus2.setForeground(Color.red);
		    		lblStatus2.setText("Waiting for participants.");
		    	}
		    	if (stat[0]==1) {
		    		lblStatus4.setForeground(Color.GREEN);
		    		lblStatus4.setText("OK.");
		    	} else {	    		
		    		lblStatus4.setForeground(Color.red);
		    		lblStatus4.setText("Ordering.");
		    	}
		    	if (stat[1]==1) {
		    		lblStatus5.setForeground(Color.GREEN);
		    		lblStatus5.setText("OK.");
		    	} else {	    		
		    		lblStatus5.setForeground(Color.red);
		    		lblStatus5.setText("Ordering.");
		    	}
		    	if (stat[3]==1) {
		    		lblStatus6.setForeground(Color.GREEN);
		    		lblStatus6.setText("OK.");
		    	} else {	    		
		    		lblStatus6.setForeground(Color.red);
		    		lblStatus6.setText("Ordering.");
		    	}
		    }
		    
		  }
	 
	 private class SwingAction extends AbstractAction {
			public SwingAction() {
				putValue(NAME, "Join Game");
				putValue(SHORT_DESCRIPTION, "Some short description");
			}
			public void actionPerformed(ActionEvent e) {
					sel_game sel = new sel_game();
					sel.setVisible(true);
					sel.addWindowListener(new WindowListener() {
						@Override
						public void windowActivated(WindowEvent arg0) {
							// TODO Auto-generated method stub
							
						}
						@Override
						public void windowClosed(WindowEvent arg0) {
							// TODO Auto-generated method stub
							upStart();
							button_4.setEnabled(false);
						}
						@Override
						public void windowClosing(WindowEvent arg0) {
							// TODO Auto-generated method stub
							
						}
						@Override
						public void windowDeactivated(WindowEvent arg0) {
							// TODO Auto-generated method stub
							
						}
						@Override
						public void windowDeiconified(WindowEvent arg0) {
							// TODO Auto-generated method stub
							
						}
						@Override
						public void windowIconified(WindowEvent arg0) {
							// TODO Auto-generated method stub
							
						}
						@Override
						public void windowOpened(WindowEvent arg0) {
							// TODO Auto-generated method stub
							
						}
			        });
			}
		}
		protected static ImageIcon createImageIcon(String path) {
	        File imgURL = new File(path);
	        if (imgURL != null) {
	            return new ImageIcon(path);
	        } else {
	            System.err.println("Couldn't find file: " + path);
	            return null;
	        }
	    }
	private class SwingAction_1 extends AbstractAction {
		public SwingAction_1() {
			putValue(NAME, "Make Shipment");
			putValue(SHORT_DESCRIPTION, "Some short description");
		}
		public void actionPerformed(ActionEvent e) {
			tabbedPane.setSelectedIndex(2);
		}
	}
	private class SwingAction_2 extends AbstractAction {
		public SwingAction_2() {
			putValue(NAME, "Make Order");
			putValue(SHORT_DESCRIPTION, "Some short description");
		}
		public void actionPerformed(ActionEvent e) {
			tabbedPane.setSelectedIndex(1);
		}
	}
	private class SwingAction_3 extends AbstractAction {
		public SwingAction_3() {
			putValue(NAME, "Place Order");
			putValue(SHORT_DESCRIPTION, "Some short description");
		}
		public void actionPerformed(ActionEvent e) {
			boolean ok=true;
			if (textField_21.getText().isEmpty()) {
				JOptionPane.showMessageDialog( null,
					       "Place order for white wine!" + e,
					       "Error", JOptionPane.ERROR_MESSAGE);
				ok=false;
			}
			if (textField_22.getText().isEmpty()) {
				JOptionPane.showMessageDialog( null,
					       "Place order for red wine!" + e,
					       "Error", JOptionPane.ERROR_MESSAGE);
				ok=false;
			}
			if(ok){
				try {
					  Connection conn =  connect.connect_DB();
					  String query = "INSERT INTO orders (Game_ID, Level, Semana, Order_Red, Order_White) VALUES (?,?,?,?,?)";
			  		  PreparedStatement ps=conn.prepareStatement(query);
			  		  ps.setInt(1, values.getIDGame());
			  		  ps.setInt(2, 2);
			  		ps.setInt(3, values.getWeek()+1);
			  		ps.setInt(4, Integer.parseInt(textField_22.getText().toString()));
			  		ps.setInt(5, Integer.parseInt(textField_21.getText().toString()));
			  		ps.execute();
			  		ps.close();
			  		conn.close();
			  		btnNewButton.setEnabled(false);
			  		JOptionPane.showMessageDialog( null,
						       "The order has been placed!",
						       "Order", JOptionPane.INFORMATION_MESSAGE);
					 values.setL1(true);
					  	tabbedPane.setIconAt(1,go);
						 connect.fin();

				} catch (SQLException e1) {
					// TODO Auto-generated catch block
					e1.printStackTrace();
				}
			 upStart();
			}
		}
	}
	private class SwingAction_4 extends AbstractAction {
		public SwingAction_4() {
			putValue(NAME, "Build Truck");
			putValue(SHORT_DESCRIPTION, "Some short description");
		}
		public void actionPerformed(ActionEvent e) {
			if (comboBox.getSelectedIndex()!=0) {
				if (comboBox_1.getSelectedIndex()!=0) {	
					if (comboBox_2.getSelectedIndex()!=0) {	
					int White = Integer.parseInt(comboBox.getSelectedItem().toString()); 
					int Red = Integer.parseInt(comboBox_1.getSelectedItem().toString()); 
					int tru = Integer.parseInt(comboBox_2.getSelectedItem().toString()); 
				if (connect.ckWineAvail(table_3, Integer.parseInt(textField_23.getText()), 2, White, tru) && connect.ckWineAvail(table_3, Integer.parseInt(textField_24.getText()), 3, Red, tru) ) {	
				if ((White+Red)<=2) {	
					Object[] result = new Object[4];
					result[0] = table_3.getRowCount();
					result[1] = comboBox_2.getSelectedItem();
					result[2]= comboBox.getSelectedItem();
					result[3]= comboBox_1.getSelectedItem();
					
					((DefaultTableModel)table_3.getModel()).addRow(result);
					comboBox.setSelectedIndex(0);
					comboBox_1.setSelectedIndex(0);
					comboBox_2.setSelectedIndex(0);
				} else {	JOptionPane.showMessageDialog( null,
					       "The total amount exeeds capacity of container!",
					       "Error", JOptionPane.ERROR_MESSAGE);
			    }	
				} else {	JOptionPane.showMessageDialog( null,
					       "The total amount shipped exeeds availability!",
					       "Error", JOptionPane.ERROR_MESSAGE);
				}
				} else {	JOptionPane.showMessageDialog( null,
					       "Select the number of Trucks!",
					       "Error", JOptionPane.ERROR_MESSAGE);
			}		
				} else {	JOptionPane.showMessageDialog( null,
					       "Select amount Red wine to Ship!",
					       "Error", JOptionPane.ERROR_MESSAGE);
			}	
			} else {	JOptionPane.showMessageDialog( null,
					       "Select amount White wine to Ship!",
					       "Error", JOptionPane.ERROR_MESSAGE);
			}
			
			
		}
		
	}
	private class SwingAction_5 extends AbstractAction {
		public SwingAction_5() {
			putValue(NAME, "Delete Truck");
			putValue(SHORT_DESCRIPTION, "Some short description");
		}
		public void actionPerformed(ActionEvent e) {

			if (table_3.getSelectedRow()!=-1) {
				((DefaultTableModel)table_3.getModel()).removeRow(table_3.getSelectedRow());
			} else {	JOptionPane.showMessageDialog( null,
				       "Select a container to delete!",
				       "Error", JOptionPane.ERROR_MESSAGE);
		}
		
		}
	}
	private class SwingAction_6 extends AbstractAction {
		public SwingAction_6() {
			putValue(NAME, "Ship");
			putValue(SHORT_DESCRIPTION, "Some short description");
		}
		public void actionPerformed(ActionEvent e) {

			//Make Shipment
			int filas = ((DefaultTableModel)table_3.getModel()).getRowCount();
			int swhite =0;
			int sred =0;
			int unit=0;
			int awhite = Integer.parseInt(textField_23.getText().toString());
			int ared = Integer.parseInt(textField_24.getText().toString());
					
			for (int i=0;i<filas;i++) {
				unit= unit + Integer.parseInt(table_3.getModel().getValueAt(i, 1).toString());
				swhite= swhite + (Integer.parseInt(table_3.getModel().getValueAt(i, 2).toString())*Integer.parseInt(table_3.getModel().getValueAt(i, 1).toString()));
				sred= sred + (Integer.parseInt(table_3.getModel().getValueAt(i, 3).toString())*Integer.parseInt(table_3.getModel().getValueAt(i, 1).toString()));
			}
			if ((awhite>=swhite) && (ared>=sred)) {
			try {
				 Connection conn =  connect.connect_DB();
				 /*
				  String query = "INSERT INTO orders_inv_back (Game_ID, Level, Semana, ava_sem, Red_Ship, Red_Inv, Red_Back, White_Ship, White_Inv, White_back) VALUES (?,?,?,?,?,?,?,?,?,?)";
		  		  PreparedStatement ps=conn.prepareStatement(query);
		  		  ps.setInt(1, values.getIDGame());
		  		  ps.setInt(2,1);
		  		  ps.setInt(3, values.getWeek()+1);
		  		  ps.setInt(4, values.getWeek()+2);
		  		  ps.setInt(5, sred);
		  		  if (ored>dred) {
		  			ps.setInt(6,0);
		  			ps.setInt(7,(ored-dred));
		  		  } else {
		  			ps.setInt(6,(dred-ored));
		  			ps.setInt(7,0);
		  		  }
		  		  ps.setInt(8, swhite);
		  		if (owhite>dwhite) {
		  			ps.setInt(9,0);
		  			ps.setInt(10,(owhite-dwhite));
		  		  } else {
		  			ps.setInt(9,(dwhite-owhite));
		  			ps.setInt(10,0);
		  		  }
		  		ps.execute();
		  		ps.close();
		  		*/
		  		String query = "INSERT INTO shipping (Game_ID, Level, Semana, units, Ship_red, Ship_White) VALUES (?,?,?,?,?,?)";
		  		PreparedStatement  ps=conn.prepareStatement(query);
		  		  ps.setInt(1, values.getIDGame());
		  		  ps.setInt(2,2);
		  		  ps.setInt(3, values.getWeek()+1);
		  		  ps.setInt(4, unit);
		  		  ps.setInt(5, sred);
		  		  ps.setInt(6, swhite);
		  		ps.execute();
		  		ps.close();
		  		conn.close();
		  		
			} catch (SQLException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}
			button_1.setEnabled(false);
			tabbedPane.setIconAt(2,go);
			values.setShip(true);
		    connect.fin();
			} else {
				JOptionPane.showMessageDialog( null,
					       "You do not have enough red or White wine to ship!",
					       "Error", JOptionPane.ERROR_MESSAGE);
			}
			
		}
	}
	private class SwingAction_7 extends AbstractAction {
		public SwingAction_7() {
			putValue(NAME, "About Wine Game");
			putValue(SHORT_DESCRIPTION, "Some short description");
		}
		public void actionPerformed(ActionEvent e) {
			splash spl = new splash();
		}
	}
}
